ci: take the lua and python plugins back; drop perl and the theme manager - #9
Merged
Conversation
…p stack gvsbuild's luajit recipe runs .\msvcbuild through CreateProcess, which cannot launch a .bat, so build LuaJIT here instead: a pinned v2.1 commit, compiled by msvcbuild.bat under vcvars64 via a generated .cmd (sidestepping cmd /c quote stripping), verified by its artifacts since the batch file's exit code is not trustworthy, and installed into the gvsbuild prefix exactly where poxchat.props already looks (lua51.lib, bin\lua51.dll, include\luajit-2.1). lgi and --enable-gi stay out; the lua plugin needs neither. The python plugin's runtime comes from CPython's embeddable package, pinned by version and sha256 and unpacked to C:\gtk-build\python-embed for the workflow to stage. Its minor version is load-bearing in poxchat.props (Python3Lib), the workflow's setup-python, and poxchat.iss.tt's python313.* names -- the param comment says to bump all four together.
setup-python moves to 3.13 to match Python3Lib=python313, and installs cffi: generate_plugin.py renders python.c through it at build time, and copy.vcxproj stages _cffi_backend*.pyd out of its site-packages for run time. The new staging step lays the embeddable runtime into the tree after the copy project and before the import check and smoke test, so hcpython3.dll's python313.dll dependency is exercised against the tree that ships. It never overwrites -- gvsbuild's sqlite3.dll is already staged and python's _sqlite3.pyd is content with any current sqlite -- and it drops the package's own interpreter binaries, which nothing runs. poxchat.props' default YourPython3Path said C:\Python314 while Python3Lib said python313; align the default on 3.13.
perl is no longer a supported plugin on Windows and thememan never builds here (it wants a .NET toolchain), so their payloads leave every section they touched: [Components], [Registry] (.hct associations), [Run], [Files], [Icons], and the Pascal [Code] that downloaded Perl/Python/dotnet installers at install time. CheckDLL, CheckVC2013Install and CheckDotNetInstall existed only for those flows and go with them; idp now fetches just vcredist and the spelling dictionaries. python switches from 'requires Python 3.8 on the system' to the CI-staged embeddable runtime: python313.dll and friends become ordinary [Files] entries, and the component joins the normal install type alongside lua (now LuaJIT only -- no lgi payloads, which never build here). Also add the staged DLLs the [Files] list never learned about (sqlite3, the gdk-pixbuf loader chain, and the conditionally staged libcurl/psl/ICU set, mirrored with skipifsourcedoesntexist), so an installed tree matches the portable zip instead of dying on its first missing DLL.
Rewrite 'Currently left out' into what actually holds: how LuaJIT and the embeddable CPython get into the tree, the four places the Python minor version is pinned, and that perl/thememan are deliberate removals rather than pending work.
A release publish now runs the Windows build with the installer leg forced on, and a separate publish job attaches the portable zip and the installer exe to the release -- same shape as release.yml uses for the AppImage and debs. The build job keeps its read-only token; only the upload job gets contents: write.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Chained on #8. That PR left the scripting plugins out of the Windows build;
this one brings back the two we want — lua and python — and removes the two
nobody does: perl and htm/thememan.
lua
The only blocker was gvsbuild's recipe (it runs
.\msvcbuildthroughCreateProcess, which cannot launch a.bat).build-deps.ps1now buildsLuaJIT itself — a pinned v2.1 commit, compiled by
msvcbuild.batundervcvars64via a generated.cmdso cmd /c's quote-stripping never meets thespaces in the Visual Studio path — and installs it into the gvsbuild prefix
exactly where
poxchat.propsalready looks (lua51.lib,bin\lua51.dll,include\luajit-2.1).copy.vcxproj's existingExists()condition stagesthe DLL with zero project changes. lgi and
--enable-gistay out: the pluginneeds neither, they only ever gave Lua scripts GObject bindings.
python
The plugin is a cffi embedding, so it needs three things:
cffiin the buildinterpreter (
generate_plugin.pyrenderspython.cthrough it),python313.libto link (setup-python's install hasinclude\andlibs\laid out exactly as
python3.vcxprojexpects), and an interpreter beside thebinary at run time. The last comes from CPython's embeddable package —
pinned by version and sha256 in
build-deps.ps1— staged whole into the tree,so users need no system Python.
python313._pth's.entry keeps the installdir on
sys.path, which is wherecopy.vcxprojalready drops_cffi_backend*.pyd.The minor version is pinned in four places that move together (workflow
python-version,Python3Libin the props,$PythonEmbedVersion+hash inbuild-deps.ps1, thepython313.*names in the installer); every one of themsays so in a comment. The props' default
YourPython3PathsaidC:\Python314against
Python3Lib=python313— aligned on 3.13.The runtime is staged after the copy project and before the import check
and smoke test, so
hcpython3.dll → python313.dllis judged against the treethat ships. It never overwrites: gvsbuild's
sqlite3.dllis already staged,and python's
_sqlite3.pydis content with any current sqlite beside it.installer
perl and thememan leave every section they touched —
[Components],[Registry](the.hctassociations),[Run],[Files],[Icons], andthe Pascal
[Code]that downloaded Perl/Python/dotnet installers at installtime.
CheckDLL,CheckVC2013InstallandCheckDotNetInstallexisted onlyfor those flows and go with them; idp now fetches just vcredist and the
spelling dictionaries. The python component stops meaning "requires Python
3.8 on the system" and ships the bundled runtime as ordinary
[Files]entries, joining lua in the normal install type.
While in there: the
[Files]list never learned about a dozen DLLs thestaged tree carries (
sqlite3.dll, the gdk-pixbuf loader chain, thelibcurl→psl→ICU set), so an installed tree — unlike the portable zip — was
missing them. Added, with the conditionally-staged set mirrored as
skipifsourcedoesntexistto matchcopy.vcxproj's optionality. With nounbuildable payloads left,
-f installer=trueshould now compile.Cost
build-deps.ps1changed, so the first run re-keys the cache — butrestore-keysresumes from #8's stack and gvsbuild skips everything alreadybuilt; LuaJIT itself is under a minute and the embeddable zip is an 11 MB
download.
🤖 Generated with Claude Code